package com.itany.book.controller;

import com.itany.book.pojo.Press;
import com.itany.book.service.PressService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * Author:yaozhiyuan0117@163.com
 * Time:2019/12/30 17:00
 * Describe:
 * version:1.0
 */

@Controller
@RequestMapping("/press")
public class PressController {

    @Autowired
    private PressService pressService;

    @RequestMapping("/findAll")
    @ResponseBody
    public List<Press> findAll(){
        List<Press> presses = pressService.findAll();
        return presses;
    }
}
